﻿/* Write a program that reads two dates in the format: day.month.year and calculates the number 
 * of days between them. Example:
Enter the first date: 27.02.2006
Enter the second date: 3.03.2004
Distance: 4 days
 */
using System;

namespace _16.ReadDates
{
    class ReadDates
    {
        static void Main()
        {
            Console.Write("Enter the first date: ");
            DateTime str_date1 = new DateTime();
            str_date1 = DateTime.Parse(Console.ReadLine());
            Console.Write("Enter the first date: ");
            DateTime str_date2 = new DateTime();
            str_date2 = DateTime.Parse(Console.ReadLine());

            TimeSpan difference = str_date2.Subtract(str_date1);
            Console.WriteLine("The distance between the two dates {0:dd.MM.yyyy} and {1:dd.MM.yyyy} is {2} d", str_date1, str_date2, difference.Days);
        }
    }
}
